﻿using Net5ApiAndEfMySql.DtoModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VueAndNetCoreEfApi.IRepository.SystemAdmin;
using VueAndNetCoreEfApi.IService.SystemAdmin;
using VueAndNetCoreEfApi.PoModel.SystemAdmin;
using VueAndNetCoreEfApi.Repository.SystemAdmin;

namespace VueAndNetCoreEfApi.Service.SystemAdmin
{
    public class PositioninfoService : IPositioninfoService
    {
        private IPositioninfoRepository _ipositioninfoRepository;
        public PositioninfoService(IPositioninfoRepository ipositioninfoRepository)
        {
            _ipositioninfoRepository = ipositioninfoRepository;
        }
        //信息显示方法
        public PagerResult<positioninfo> PositioninfoList(SearchModel m)//信息显示方法
        {
            var list = _ipositioninfoRepository.PositioninfoList(m);
            return list;
        }
        //信息添加
        public bool positioninfoAdd(positioninfo info)//信息添加
        {
            return _ipositioninfoRepository.positioninfoAdd(info);
        }
        //信息删除
        public bool positioninfoDelete(int po_id)//信息删除
        {
            return _ipositioninfoRepository.positioninfoDelete(po_id);
        }
        //修改信息
        public bool PositioninfoDel(positioninfo info)//修改信息
        {
            var i = _ipositioninfoRepository.PositioninfoDel(info);
            return i;
        }

        public positioninfo PositioninfoBypo_id(int po_id) //反填
        {
            var i = _ipositioninfoRepository.PositioninfoBypo_id(po_id);
            return i;
        }
        public positioninfo PositioninfoDtoBypo_id(int po_id)  //反填
        {
            var i = _ipositioninfoRepository.PositioninfoDtoBypo_id(po_id);
            return i;
        }




    }
}
